package com.zzyl.mapper;


import com.github.pagehelper.Page;
import com.zzyl.entity.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NursingLevelMapper {

    /**
     * 查询所有护理等级
     * @return
     */
    List<NursingLevelVo> getAllLevel();


    /**
     * 新增
     * @param nursingLevel
     */
    void addNursingLevel(NursingLevel nursingLevel);


    /**
     * 分页查询
     * @param name
     * @param status
     * @return
     */
    Page<NursingLevelVo> selectByPage(String name, Integer status);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    NursingLevel getById(Long id);


    /**
     * 删除
     * @param id
     */

    void deleteLevel(Long id);


    /**
     * 修改
     */
    void modify(NursingLevel nursingLevel);


    /**
     * 启用禁用
     * @param id
     * @param status
     */
    void enableOrDisable(@Param("id") Long id,@Param("status") Integer status);


    /**
     * 根据planId查询
     * @param id
     * @return
     */
    List<NursingLevel> selectByPlanId(Long id);


    /**
     * 根据名称查询护理等级
     * @param name
     * @return
     */
    NursingLevel selectByName(String name);


    /**
     * 查询是否有重名
     * @param name
     * @param id
     * @return
     */
    Long countDiffBedNumber(String name, Long id);
}
